package com.jevons.geo_edit.constant;

/**
 * Copyright 2020 JxGIS
 *
 * @file GisGemetryType
 * @auth linaisheng
 * Created on 2023/6/14.
 * Description：
 */
public enum GisGeometryType {

    None(0),
    Point(1),
    Line(2),
    Polygon(3);

    private int type;


    private GisGeometryType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    // 此方法是关键
    public static GisGeometryType getByType(int type) {
        for (GisGeometryType pointType : values()) {
            if (pointType.getType() == type) {
                return pointType;
            }
        }
        return null;
    }

}